package bean;

/**
 * AtcLogId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class AtcLogId implements java.io.Serializable {

	// Fields

	private Attractions attractions;
	private Travelogue travelogue;

	// Constructors

	/** default constructor */
	public AtcLogId() {
	}

	/** full constructor */
	public AtcLogId(Attractions attractions, Travelogue travelogue) {
		this.attractions = attractions;
		this.travelogue = travelogue;
	}

	// Property accessors

	public Attractions getAttractions() {
		return this.attractions;
	}

	public void setAttractions(Attractions attractions) {
		this.attractions = attractions;
	}

	public Travelogue getTravelogue() {
		return this.travelogue;
	}

	public void setTravelogue(Travelogue travelogue) {
		this.travelogue = travelogue;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof AtcLogId))
			return false;
		AtcLogId castOther = (AtcLogId) other;

		return ((this.getAttractions() == castOther.getAttractions()) || (this
				.getAttractions() != null
				&& castOther.getAttractions() != null && this.getAttractions()
				.equals(castOther.getAttractions())))
				&& ((this.getTravelogue() == castOther.getTravelogue()) || (this
						.getTravelogue() != null
						&& castOther.getTravelogue() != null && this
						.getTravelogue().equals(castOther.getTravelogue())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getAttractions() == null ? 0 : this.getAttractions()
						.hashCode());
		result = 37
				* result
				+ (getTravelogue() == null ? 0 : this.getTravelogue()
						.hashCode());
		return result;
	}

}